<?php
/**
 * Advice Model
 * 
 * @author CRIA Groep 1 <project@markvink.nl>
 * @version 1.0
 * @package models
 */
class Advice extends AppModel 
{
	/**
    * @var string Model name (faster in PHP 4)
    */
	var $name = 'Advice';
	
	/**
    * @var string displays field in select box
    */
	var $displayField = 'id';
	
	/**
    * @var array Model behavior
    */		
	var $actsAs = array(
        'MeioUpload' => array('filename')
    );
		
	/**
    * @var array belongsTo relations
    */		
	var $belongsTo = array(
		'Laundry' => array(
            'className' => 'Laundry'
        ),
	);
	
	/**
	 * Callback Function beforeSave
	 * 
	 * This function is called before saving
	 * @param array $options
	 * @return boolean proceed saving proces
	 */
	function beforeSave($options) {
    	$this->data['Advice']['dir'] = str_replace('\\', '/', $this->data['Advice']['dir']);
		return true;
	}
}
